import request from '@/utils/request';
import config from '@/env/config';
import { ICategory } from '@/types';

/**
 * 查询所有的类目
 * @returns string
 */
export function getCategory(): Promise<ICategory[]> {
  return request({
    method: 'get',
    url: `${config.SERVICE_API}api/commodity/category`,
  });
}
